/*
 * Relay.h
 *
 *  Created on: Feb 5, 2012
 *      Author: xum
 */

#ifndef RELAY_H_
#define RELAY_H_
#include "Arduino.h"

class Relay {

protected:
    int port;
    byte state;
public:
    static const boolean ON_STATE=true;
    static const boolean OFF_STATE=false;
    Relay();
    Relay(int port);
    boolean getState() const;
    void turnOn();
    void turnOff();
    void keepOn();
    boolean isOn() const;
    void setState(boolean state);
};

#endif /* RELAY_H_ */
